class Solution:
    def reverseWords(self, s: str) -> str:
        return " ".join(reversed(s.split()))

s="the sky is blue"
print(Solution().reverseWords(s))